<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Percent positioning vGIN for Alladyn</title>
<meta name="Author" content="Gandalf">

<script language="JavaScript" src="Alladyn.js"></script>
<script language="JavaScript">
<!--


function AT_pos(v){
var W=ie?doc.body.clientWidth:window.innerWidth;
var H=ie?doc.body.clientHeight:window.innerHeight;
function per(w,h){v.vpos((W-(ns4?v.document.width:v.offsetWidth)/2)*w/100,(H-(ns4?v.document.height:v.offsetHeight)/2)*h/100)}
return per
}

function init(){
Alladyn(['AT_pos']);
vlay['x'].vGIN.AT_pos(50,50);
}

function setNew(){
vlay['x'].vGIN.AT_pos(document.val.elements['x'].value,document.val.elements['y'].value);
}
//-->
</script>
</head>

<body onload="init()">
<div id="x" style="position:absolute;top:0;left:0"><img src="1.gif" width="100" height="50"></div>
Wpisz w procentach pozycje:
<form name="val">
left:<input type="text" name="x" value="50" onchange="setNew()">%<br>
top:<input type="text" name="y" value="50" onchange="setNew()">%
</form>
</body>
</html>
